import 'package:flutter/material.dart';
import 'package:flutter_app/router/route_names.dart';
import 'package:go_router/go_router.dart';

class GuidePage extends StatefulWidget {
  const GuidePage({super.key});

  @override
  State<GuidePage> createState() => _GuidePageState();
}

class _GuidePageState extends State<GuidePage>
    with SingleTickerProviderStateMixin {
  late AnimationController _controller;

  @override
  void initState() {
    super.initState();
    _controller = AnimationController(vsync: this);
  }

  @override
  void dispose() {
    _controller.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text("引导页")),
      body: Center(
        child: TextButton(
          onPressed: () {
            context.push(RouteNames.first, extra: {"title": "标题"});
            // context.pushNamed(RouteNames.first, extra: {"title": "标题"});
          },
          child: Text("点击", style: TextStyle(fontSize: 20)),
        ),
      ),
    );
  }
}
